<template>
  <div id="main" class="app-main">
    <router-view></router-view>
    <footer class="footer">
      <div class="beian-content">
        <p class="beian-text">
          ICP备案号：
          <a href="https://beian.miit.gov.cn/" target="_blank">渝ICP备2024044982号</a>
        </p>
      </div>
    </footer>
  </div>
</template>

<script>
import { getCategoryTree } from '@/api/goods.js'
export default {
  updated () {
    if (!localStorage.getItem('category') && this.$route.path !== '/login') {
      getCategoryTree(0).then(res => {
        if (res.success) {
          localStorage.setItem('category', JSON.stringify(res.result))
        }
      })
    }
  },
};
</script>

<style>
html,
body {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  font-size: 12px;
  margin: 0;
}

.app-main {
  width: 100%;
  height: 100%;
  position: relative; /* 相对定位，确保子元素绝对定位有效 */
}

.footer {
  padding: 5px;
  text-align: center;
  position: absolute;
  bottom: 0;
  width: 100%;
}

.beian-content {
  margin-top: 1px;
}

.beian-text {
  font-size: 14px;
  color: #333;
}

.br button {
  margin-right: 5px;
}

.operation button {
  margin-right: 5px;
}

.ivu-btn-text:focus {
  box-shadow: none !important;
}

.ivu-tag {
  cursor: pointer;
}

.tox-notifications-container {
  display: none !important;
}
</style>
